<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::TSDFVolume&lt; VoxelT, WeightT &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_t_s_d_f_volume.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-types">Private 类型</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classpcl_1_1_t_s_d_f_volume-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::TSDFVolume&lt; VoxelT, WeightT &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_t_s_d_f_volume_1_1_header.html">Header</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure storing voxel grid resolution, volume size (in mm) and element_size of stored data  <a href="structpcl_1_1_t_s_d_f_volume_1_1_header.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpcl_1_1_t_s_d_f_volume_1_1_intr.html">Intr</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_camera.html">Camera</a> intrinsics structure  <a href="structpcl_1_1_t_s_d_f_volume_1_1_intr.html#details">更多...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a1c86ba6bd009a3b85d693674317c02cb"><td class="memItemLeft" align="right" valign="top"><a id="a1c86ba6bd009a3b85d693674317c02cb"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1_t_s_d_f_volume.html">TSDFVolume</a>&lt; VoxelT, WeightT &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:a1c86ba6bd009a3b85d693674317c02cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea47a3f23dff155ebf2dcbced2591573"><td class="memItemLeft" align="right" valign="top"><a id="aea47a3f23dff155ebf2dcbced2591573"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_t_s_d_f_volume.html">TSDFVolume</a>&lt; VoxelT, WeightT &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:aea47a3f23dff155ebf2dcbced2591573"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a408cb98bc11ddde7c5eb0a754af67805"><td class="memItemLeft" align="right" valign="top"><a id="a408cb98bc11ddde7c5eb0a754af67805"></a>
typedef Eigen::VectorXf&#160;</td><td class="memItemRight" valign="bottom"><b>VoxelTVec</b></td></tr>
<tr class="separator:a408cb98bc11ddde7c5eb0a754af67805"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:af992eeb671cd24461fe112809a753c39"><td class="memItemLeft" align="right" valign="top"><a id="af992eeb671cd24461fe112809a753c39"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#af992eeb671cd24461fe112809a753c39">TSDFVolume</a> ()</td></tr>
<tr class="memdesc:af992eeb671cd24461fe112809a753c39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor <br /></td></tr>
<tr class="separator:af992eeb671cd24461fe112809a753c39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80adffb1b1aa7660d53b335f16e8c4a4"><td class="memItemLeft" align="right" valign="top"><a id="a80adffb1b1aa7660d53b335f16e8c4a4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a80adffb1b1aa7660d53b335f16e8c4a4">TSDFVolume</a> (const std::string &amp;filename)</td></tr>
<tr class="memdesc:a80adffb1b1aa7660d53b335f16e8c4a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor loading data from file <br /></td></tr>
<tr class="separator:a80adffb1b1aa7660d53b335f16e8c4a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45c22c7b665dedac2cd3bb459808c6b5"><td class="memItemLeft" align="right" valign="top"><a id="a45c22c7b665dedac2cd3bb459808c6b5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a45c22c7b665dedac2cd3bb459808c6b5">setHeader</a> (const Eigen::Vector3i &amp;resolution, const Eigen::Vector3f &amp;volume_size)</td></tr>
<tr class="memdesc:a45c22c7b665dedac2cd3bb459808c6b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the header directly. Useful if directly writing into volume and weights <br /></td></tr>
<tr class="separator:a45c22c7b665dedac2cd3bb459808c6b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c97097594bc29d6df3ca82ebf9e3d1b"><td class="memItemLeft" align="right" valign="top"><a id="a0c97097594bc29d6df3ca82ebf9e3d1b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a0c97097594bc29d6df3ca82ebf9e3d1b">resize</a> (Eigen::Vector3i &amp;grid_resolution, const Eigen::Vector3f &amp;volume_size=Eigen::Vector3f(DEFAULT_VOLUME_SIZE_X, DEFAULT_VOLUME_SIZE_Y, DEFAULT_VOLUME_SIZE_Z))</td></tr>
<tr class="memdesc:a0c97097594bc29d6df3ca82ebf9e3d1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resizes the internal storage and updates the header accordingly <br /></td></tr>
<tr class="separator:a0c97097594bc29d6df3ca82ebf9e3d1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec0a3dd31d83039caac1f8ce47c7fe46"><td class="memItemLeft" align="right" valign="top"><a id="aec0a3dd31d83039caac1f8ce47c7fe46"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#aec0a3dd31d83039caac1f8ce47c7fe46">resizeDefaultSize</a> ()</td></tr>
<tr class="memdesc:aec0a3dd31d83039caac1f8ce47c7fe46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resize internal storage and header to default sizes defined in tsdf_volume.h <br /></td></tr>
<tr class="separator:aec0a3dd31d83039caac1f8ce47c7fe46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb47daa8c7fad453a3e79845bfa8eed7"><td class="memItemLeft" align="right" valign="top"><a id="aeb47daa8c7fad453a3e79845bfa8eed7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#aeb47daa8c7fad453a3e79845bfa8eed7">load</a> (const std::string &amp;filename, bool binary=true)</td></tr>
<tr class="memdesc:aeb47daa8c7fad453a3e79845bfa8eed7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads volume from file <br /></td></tr>
<tr class="separator:aeb47daa8c7fad453a3e79845bfa8eed7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6f8ccba041577663f4ddae013777d4b"><td class="memItemLeft" align="right" valign="top"><a id="ab6f8ccba041577663f4ddae013777d4b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#ab6f8ccba041577663f4ddae013777d4b">save</a> (const std::string &amp;filename=&quot;tsdf_volume.dat&quot;, bool binary=true) const</td></tr>
<tr class="memdesc:ab6f8ccba041577663f4ddae013777d4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves volume to file <br /></td></tr>
<tr class="separator:ab6f8ccba041577663f4ddae013777d4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56f4e9cf9ed8657f3b6c7bf8519ddff9"><td class="memItemLeft" align="right" valign="top"><a id="a56f4e9cf9ed8657f3b6c7bf8519ddff9"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a56f4e9cf9ed8657f3b6c7bf8519ddff9">size</a> () const</td></tr>
<tr class="memdesc:a56f4e9cf9ed8657f3b6c7bf8519ddff9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns overall number of voxels in grid <br /></td></tr>
<tr class="separator:a56f4e9cf9ed8657f3b6c7bf8519ddff9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4820ad94f2505e58cc3882db7b1b581c"><td class="memItemLeft" align="right" valign="top"><a id="a4820ad94f2505e58cc3882db7b1b581c"></a>
const Eigen::Vector3f &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a4820ad94f2505e58cc3882db7b1b581c">volumeSize</a> () const</td></tr>
<tr class="memdesc:a4820ad94f2505e58cc3882db7b1b581c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the volume size in mm <br /></td></tr>
<tr class="separator:a4820ad94f2505e58cc3882db7b1b581c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50cd3ac9b79ea04ea57f90bcac7c8fa9"><td class="memItemLeft" align="right" valign="top"><a id="a50cd3ac9b79ea04ea57f90bcac7c8fa9"></a>
Eigen::Vector3f&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a50cd3ac9b79ea04ea57f90bcac7c8fa9">voxelSize</a> () const</td></tr>
<tr class="memdesc:a50cd3ac9b79ea04ea57f90bcac7c8fa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of one voxel in mm <br /></td></tr>
<tr class="separator:a50cd3ac9b79ea04ea57f90bcac7c8fa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4eb7028c2632f2fba6630ad41af56d2"><td class="memItemLeft" align="right" valign="top"><a id="af4eb7028c2632f2fba6630ad41af56d2"></a>
const Eigen::Vector3i &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#af4eb7028c2632f2fba6630ad41af56d2">gridResolution</a> () const</td></tr>
<tr class="memdesc:af4eb7028c2632f2fba6630ad41af56d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the voxel grid resolution <br /></td></tr>
<tr class="separator:af4eb7028c2632f2fba6630ad41af56d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c92580c6d64e7b8e5b9a5fed6b646b8"><td class="memItemLeft" align="right" valign="top"><a id="a6c92580c6d64e7b8e5b9a5fed6b646b8"></a>
const <a class="el" href="structpcl_1_1_t_s_d_f_volume_1_1_header.html">Header</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a6c92580c6d64e7b8e5b9a5fed6b646b8">header</a> () const</td></tr>
<tr class="memdesc:a6c92580c6d64e7b8e5b9a5fed6b646b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns constant reference to header <br /></td></tr>
<tr class="separator:a6c92580c6d64e7b8e5b9a5fed6b646b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9ced23d4fda0a3e1e290ec10f140b99"><td class="memItemLeft" align="right" valign="top"><a id="ae9ced23d4fda0a3e1e290ec10f140b99"></a>
const std::vector&lt; VoxelT &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#ae9ced23d4fda0a3e1e290ec10f140b99">volume</a> () const</td></tr>
<tr class="memdesc:ae9ced23d4fda0a3e1e290ec10f140b99"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns constant reference to the volume std::vector <br /></td></tr>
<tr class="separator:ae9ced23d4fda0a3e1e290ec10f140b99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5b7370545f94983ac55eacff7dea84d"><td class="memItemLeft" align="right" valign="top"><a id="ad5b7370545f94983ac55eacff7dea84d"></a>
std::vector&lt; VoxelT &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#ad5b7370545f94983ac55eacff7dea84d">volumeWriteable</a> () const</td></tr>
<tr class="memdesc:ad5b7370545f94983ac55eacff7dea84d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns writebale(!) reference to volume <br /></td></tr>
<tr class="separator:ad5b7370545f94983ac55eacff7dea84d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e9fd3a3b84701322bbd09e53378b392"><td class="memItemLeft" align="right" valign="top"><a id="a4e9fd3a3b84701322bbd09e53378b392"></a>
const std::vector&lt; WeightT &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a4e9fd3a3b84701322bbd09e53378b392">weights</a> () const</td></tr>
<tr class="memdesc:a4e9fd3a3b84701322bbd09e53378b392"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns constant reference to the weights std::vector <br /></td></tr>
<tr class="separator:a4e9fd3a3b84701322bbd09e53378b392"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87524bf7ed2a7e43be6acc696c7cb1eb"><td class="memItemLeft" align="right" valign="top"><a id="a87524bf7ed2a7e43be6acc696c7cb1eb"></a>
std::vector&lt; WeightT &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a87524bf7ed2a7e43be6acc696c7cb1eb">weightsWriteable</a> () const</td></tr>
<tr class="memdesc:a87524bf7ed2a7e43be6acc696c7cb1eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns writebale(!) reference to volume <br /></td></tr>
<tr class="separator:a87524bf7ed2a7e43be6acc696c7cb1eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e3587ac6896e80dd50d66d8ebb42b74"><td class="memItemLeft" align="right" valign="top"><a id="a9e3587ac6896e80dd50d66d8ebb42b74"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a9e3587ac6896e80dd50d66d8ebb42b74">convertToTsdfCloud</a> (<a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_i.html">pcl::PointXYZI</a> &gt;::Ptr &amp;cloud) const</td></tr>
<tr class="memdesc:a9e3587ac6896e80dd50d66d8ebb42b74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts volume to cloud of TSDF values <br /></td></tr>
<tr class="separator:a9e3587ac6896e80dd50d66d8ebb42b74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfc8edbbdb7955be77741138f6aa523c"><td class="memTemplParams" colspan="2">template&lt;typename PointT &gt; </td></tr>
<tr class="memitem:adfc8edbbdb7955be77741138f6aa523c"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#adfc8edbbdb7955be77741138f6aa523c">getVoxelCoord</a> (const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;point, Eigen::Vector3i &amp;voxel_coord) const</td></tr>
<tr class="memdesc:adfc8edbbdb7955be77741138f6aa523c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts the volume to a surface representation via a point cloud  <a href="classpcl_1_1_t_s_d_f_volume.html#adfc8edbbdb7955be77741138f6aa523c">更多...</a><br /></td></tr>
<tr class="separator:adfc8edbbdb7955be77741138f6aa523c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fc19b2142b5b09cf919b6716dface58"><td class="memTemplParams" colspan="2"><a id="a2fc19b2142b5b09cf919b6716dface58"></a>
template&lt;typename PointT &gt; </td></tr>
<tr class="memitem:a2fc19b2142b5b09cf919b6716dface58"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a2fc19b2142b5b09cf919b6716dface58">getVoxelCoordAndOffset</a> (const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;point, Eigen::Vector3i &amp;voxel_coord, Eigen::Vector3f &amp;offset) const</td></tr>
<tr class="memdesc:a2fc19b2142b5b09cf919b6716dface58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retunrs the 3D voxel coordinate and point offset wrt. to the voxel center (in mm) <br /></td></tr>
<tr class="separator:a2fc19b2142b5b09cf919b6716dface58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1722d6dd73c45d14a9edd961989de574"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a1722d6dd73c45d14a9edd961989de574">extractNeighborhood</a> (const Eigen::Vector3i &amp;voxel_coord, int neighborhood_size, VoxelTVec &amp;neighborhood) const</td></tr>
<tr class="separator:a1722d6dd73c45d14a9edd961989de574"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5afa4e1a60f62aab63dcd66fa44e2ae6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#a5afa4e1a60f62aab63dcd66fa44e2ae6">addNeighborhood</a> (const Eigen::Vector3i &amp;voxel_coord, int neighborhood_size, const VoxelTVec &amp;neighborhood, WeightT voxel_weight)</td></tr>
<tr class="separator:a5afa4e1a60f62aab63dcd66fa44e2ae6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7d2607c0d7a0707229f50f3a086b3ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#ad7d2607c0d7a0707229f50f3a086b3ff">averageValues</a> ()</td></tr>
<tr class="separator:ad7d2607c0d7a0707229f50f3a086b3ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae533ec68528cf33f542d3982bf9e4e58"><td class="memItemLeft" align="right" valign="top"><a id="ae533ec68528cf33f542d3982bf9e4e58"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#ae533ec68528cf33f542d3982bf9e4e58">getLinearVoxelIndex</a> (const Eigen::Array3i &amp;indices) const</td></tr>
<tr class="memdesc:ae533ec68528cf33f542d3982bf9e4e58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns and index for linear access of the volume and weights <br /></td></tr>
<tr class="separator:ae533ec68528cf33f542d3982bf9e4e58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af202af12c2907c52849acac08fe7b192"><td class="memItemLeft" align="right" valign="top"><a id="af202af12c2907c52849acac08fe7b192"></a>
Eigen::VectorXi&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html#af202af12c2907c52849acac08fe7b192">getLinearVoxelIndinces</a> (const Eigen::Matrix&lt; int, 3, Eigen::Dynamic &gt; &amp;indices_matrix) const</td></tr>
<tr class="memdesc:af202af12c2907c52849acac08fe7b192"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a vector of linear indices for voxel coordinates given in 3xn matrix <br /></td></tr>
<tr class="separator:af202af12c2907c52849acac08fe7b192"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private 类型</h2></td></tr>
<tr class="memitem:ae45fa163b3d964612188a737066abcff"><td class="memItemLeft" align="right" valign="top"><a id="ae45fa163b3d964612188a737066abcff"></a>
typedef boost::shared_ptr&lt; std::vector&lt; VoxelT &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>VolumePtr</b></td></tr>
<tr class="separator:ae45fa163b3d964612188a737066abcff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57d0f2f684074cd0f85ff6a25b58bf41"><td class="memItemLeft" align="right" valign="top"><a id="a57d0f2f684074cd0f85ff6a25b58bf41"></a>
typedef boost::shared_ptr&lt; std::vector&lt; WeightT &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>WeightsPtr</b></td></tr>
<tr class="separator:a57d0f2f684074cd0f85ff6a25b58bf41"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a7ca3ae623247ba1802639bfc9929a875"><td class="memItemLeft" align="right" valign="top"><a id="a7ca3ae623247ba1802639bfc9929a875"></a>
<a class="el" href="structpcl_1_1_t_s_d_f_volume_1_1_header.html">Header</a>&#160;</td><td class="memItemRight" valign="bottom"><b>header_</b></td></tr>
<tr class="separator:a7ca3ae623247ba1802639bfc9929a875"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46f13ec8c2ac65bd1611003c9c937be7"><td class="memItemLeft" align="right" valign="top"><a id="a46f13ec8c2ac65bd1611003c9c937be7"></a>
VolumePtr&#160;</td><td class="memItemRight" valign="bottom"><b>volume_</b></td></tr>
<tr class="separator:a46f13ec8c2ac65bd1611003c9c937be7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2874363640260fb34bd99af8a31a0070"><td class="memItemLeft" align="right" valign="top"><a id="a2874363640260fb34bd99af8a31a0070"></a>
WeightsPtr&#160;</td><td class="memItemRight" valign="bottom"><b>weights_</b></td></tr>
<tr class="separator:a2874363640260fb34bd99af8a31a0070"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">成员函数说明</h2>
<a id="a5afa4e1a60f62aab63dcd66fa44e2ae6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5afa4e1a60f62aab63dcd66fa44e2ae6">&#9670;&nbsp;</a></span>addNeighborhood()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename VoxelT , typename WeightT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classpcl_1_1_t_s_d_f_volume.html">pcl::TSDFVolume</a>&lt; VoxelT, WeightT &gt;::addNeighborhood </td>
          <td>(</td>
          <td class="paramtype">const Eigen::Vector3i &amp;&#160;</td>
          <td class="paramname"><em>voxel_coord</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>neighborhood_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const VoxelTVec &amp;&#160;</td>
          <td class="paramname"><em>neighborhood</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WeightT&#160;</td>
          <td class="paramname"><em>voxel_weight</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>adds voxel values in local neighborhood </p>
<div class="fragment"><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;{</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <span class="comment">// point_index is at the center of a cube of scale_ x scale_ x scale_ voxels</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  <span class="keywordtype">int</span> shift = (neighborhood_size - 1) / 2;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  Eigen::Vector3i min_index = voxel_coord.array() - shift;</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  Eigen::Vector3i max_index = voxel_coord.array() + shift;</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160; </div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;  <span class="comment">// check that index is within range</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_t_s_d_f_volume.html#ae533ec68528cf33f542d3982bf9e4e58">getLinearVoxelIndex</a>(min_index) &lt; 0 || <a class="code" href="classpcl_1_1_t_s_d_f_volume.html#ae533ec68528cf33f542d3982bf9e4e58">getLinearVoxelIndex</a>(max_index) &gt;= (int)<a class="code" href="classpcl_1_1_t_s_d_f_volume.html#a56f4e9cf9ed8657f3b6c7bf8519ddff9">size</a>())</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  {</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    pcl::console::print_info (<span class="stringliteral">&quot;[addNeighborhood] Skipping voxel with coord (%d, %d, %d).\n&quot;</span>, voxel_coord(0), voxel_coord(1), voxel_coord(2));</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;  }</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160; </div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;  <span class="comment">// static const int descriptor_size = neighborhood_size*neighborhood_size*neighborhood_size;</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;  <span class="keyword">const</span> Eigen::RowVector3i offset_vector (1, neighborhood_size, neighborhood_size*neighborhood_size);</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;  Eigen::Vector3i index = min_index;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;  <span class="comment">// loop over all voxels in 3D neighborhood</span></div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="preprocessor">  #pragma omp parallel for</span></div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> z = min_index(2); z &lt;= max_index(2); ++z)</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;  {</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y = min_index(1); y &lt;= max_index(1); ++y)</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    {</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = min_index(0); x &lt;= max_index(0); ++x)</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;      {</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;        <span class="comment">// linear voxel index in volume and index in descriptor vector</span></div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        Eigen::Vector3i point (x,y,z);</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;        <span class="keywordtype">int</span> volume_idx = <a class="code" href="classpcl_1_1_t_s_d_f_volume.html#ae533ec68528cf33f542d3982bf9e4e58">getLinearVoxelIndex</a> (point);</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;        <span class="keywordtype">int</span> descr_idx  = offset_vector * (point - min_index);</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160; </div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;        <span class="comment">// add the descriptor entry to the volume</span></div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;        VoxelT &amp;voxel = volume_-&gt;at (volume_idx);</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;        WeightT &amp;weight = weights_-&gt;at (volume_idx);</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160; </div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;        <span class="comment">// TODO check that this simple lock works correctly!!</span></div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;<span class="preprocessor">        #pragma omp atomic</span></div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        voxel += neighborhood (descr_idx);</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160; </div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;<span class="preprocessor">        #pragma omp atomic</span></div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        weight += voxel_weight;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;      }</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    }</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;  }</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160; </div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1_t_s_d_f_volume_html_a56f4e9cf9ed8657f3b6c7bf8519ddff9"><div class="ttname"><a href="classpcl_1_1_t_s_d_f_volume.html#a56f4e9cf9ed8657f3b6c7bf8519ddff9">pcl::TSDFVolume::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">Returns overall number of voxels in grid</div><div class="ttdef"><b>Definition:</b> tsdf_volume.h:188</div></div>
<div class="ttc" id="aclasspcl_1_1_t_s_d_f_volume_html_ae533ec68528cf33f542d3982bf9e4e58"><div class="ttname"><a href="classpcl_1_1_t_s_d_f_volume.html#ae533ec68528cf33f542d3982bf9e4e58">pcl::TSDFVolume::getLinearVoxelIndex</a></div><div class="ttdeci">int getLinearVoxelIndex(const Eigen::Array3i &amp;indices) const</div><div class="ttdoc">Returns and index for linear access of the volume and weights</div><div class="ttdef"><b>Definition:</b> tsdf_volume.h:262</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ad7d2607c0d7a0707229f50f3a086b3ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7d2607c0d7a0707229f50f3a086b3ff">&#9670;&nbsp;</a></span>averageValues()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename VoxelT , typename WeightT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_t_s_d_f_volume.html">pcl::TSDFVolume</a>&lt; VoxelT, WeightT &gt;::averageValues</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>averages voxel values by the weight value </p>
<div class="fragment"><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;{</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;<span class="preprocessor">  #pragma omp parallel for</span></div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; volume_-&gt;size(); ++i)</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;  {</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    WeightT &amp;w = weights_-&gt;at(i);</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    <span class="keywordflow">if</span> (w &gt; 0.0)</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    {</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;      volume_-&gt;at(i) /= w;</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;      w = 1.0;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    }</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;  }</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a1722d6dd73c45d14a9edd961989de574"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1722d6dd73c45d14a9edd961989de574">&#9670;&nbsp;</a></span>extractNeighborhood()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename VoxelT , typename WeightT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classpcl_1_1_t_s_d_f_volume.html">pcl::TSDFVolume</a>&lt; VoxelT, WeightT &gt;::extractNeighborhood </td>
          <td>(</td>
          <td class="paramtype">const Eigen::Vector3i &amp;&#160;</td>
          <td class="paramname"><em>voxel_coord</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>neighborhood_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VoxelTVec &amp;&#160;</td>
          <td class="paramname"><em>neighborhood</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>extracts voxels in neighborhood of given voxel </p>
<div class="fragment"><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;{</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;  <span class="comment">// point_index is at the center of a cube of scale_ x scale_ x scale_ voxels</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  <span class="keywordtype">int</span> shift = (neighborhood_size - 1) / 2;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  Eigen::Vector3i min_index = voxel_coord.array() - shift;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  Eigen::Vector3i max_index = voxel_coord.array() + shift;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  <span class="comment">// check that index is within range</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_t_s_d_f_volume.html#ae533ec68528cf33f542d3982bf9e4e58">getLinearVoxelIndex</a>(min_index) &lt; 0 || <a class="code" href="classpcl_1_1_t_s_d_f_volume.html#ae533ec68528cf33f542d3982bf9e4e58">getLinearVoxelIndex</a>(max_index) &gt;= (int)<a class="code" href="classpcl_1_1_t_s_d_f_volume.html#a56f4e9cf9ed8657f3b6c7bf8519ddff9">size</a>())</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;  {</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    pcl::console::print_info (<span class="stringliteral">&quot;[extractNeighborhood] Skipping voxel with coord (%d, %d, %d).\n&quot;</span>, voxel_coord(0), voxel_coord(1), voxel_coord(2));</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;  }</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> descriptor_size = neighborhood_size*neighborhood_size*neighborhood_size;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  neighborhood.resize (descriptor_size);</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160; </div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;  <span class="keyword">const</span> Eigen::RowVector3i offset_vector (1, neighborhood_size, neighborhood_size*neighborhood_size);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160; </div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  <span class="comment">// loop over all voxels in 3D neighborhood</span></div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;<span class="preprocessor">  #pragma omp parallel for</span></div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> z = min_index(2); z &lt;= max_index(2); ++z)</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;  {</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y = min_index(1); y &lt;= max_index(1); ++y)</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    {</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = min_index(0); x &lt;= max_index(0); ++x)</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;      {</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        <span class="comment">// linear voxel index in volume and index in descriptor vector</span></div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        Eigen::Vector3i point (x,y,z);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <span class="keywordtype">int</span> volume_idx = <a class="code" href="classpcl_1_1_t_s_d_f_volume.html#ae533ec68528cf33f542d3982bf9e4e58">getLinearVoxelIndex</a> (point);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="keywordtype">int</span> descr_idx  = offset_vector * (point - min_index);</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160; </div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;<span class="comment">/*        std::cout &lt;&lt; &quot;linear index &quot; &lt;&lt; volume_idx &lt;&lt; std::endl;</span></div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;<span class="comment">        std::cout &lt;&lt; &quot;weight &quot; &lt;&lt; weights_-&gt;at (volume_idx) &lt;&lt; std::endl;</span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;<span class="comment">        std::cout &lt;&lt; &quot;volume &quot; &lt;&lt; volume_-&gt;at (volume_idx) &lt;&lt; std::endl;</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;<span class="comment">        std::cout &lt;&lt; &quot;descr  &quot; &lt;&lt; neighborhood.rows() &lt;&lt; &quot;x&quot; &lt;&lt; neighborhood.cols() &lt;&lt; &quot;, val = &quot; &lt;&lt; neighborhood &lt;&lt; std::endl;</span></div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;<span class="comment">        std::cout &lt;&lt; &quot;descr index = &quot; &lt;&lt; descr_idx &lt;&lt; std::endl;</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="comment">// get the TSDF value and store as descriptor entry</span></div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        <span class="keywordflow">if</span> (weights_-&gt;at (volume_idx) != 0)</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;          neighborhood (descr_idx) = volume_-&gt;at (volume_idx);</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;          neighborhood (descr_idx) = -1.0; <span class="comment">// if never visited we assume inside of object (outside captured and thus filled with positive values)</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;      }</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    }</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;  }</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160; </div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="adfc8edbbdb7955be77741138f6aa523c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adfc8edbbdb7955be77741138f6aa523c">&#9670;&nbsp;</a></span>getVoxelCoord()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename VoxelT , typename WeightT &gt; </div>
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_t_s_d_f_volume.html">pcl::TSDFVolume</a>&lt; VoxelT, WeightT &gt;::getVoxelCoord </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Eigen::Vector3i &amp;&#160;</td>
          <td class="paramname"><em>voxel_coord</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts the volume to a surface representation via a point cloud </p>
<p>Crate Volume from Point <a class="el" href="class_cloud.html" title="A wrapper which allows to use any implementation of cloud provided by a third-party library.">Cloud</a></p>
<p>Retunrs the 3D voxel coordinate </p>
<div class="fragment"><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;{</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  <span class="keyword">static</span> Eigen::Array3f voxel_size = <a class="code" href="classpcl_1_1_t_s_d_f_volume.html#a50cd3ac9b79ea04ea57f90bcac7c8fa9">voxelSize</a>().array();</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  <span class="comment">// point coordinates in world coordinate frame and voxel coordinates</span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  Eigen::Array3f point_coord (point.x, point.y, point.z);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  Eigen::Array3f voxel_coord = (point_coord / voxel_size) - 0.5f; <span class="comment">// 0.5f offset due to voxel center vs grid</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;  coord(0) = round(voxel_coord(0));</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  coord(1) = round(voxel_coord(1));</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  coord(2) = round(voxel_coord(2));</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1_t_s_d_f_volume_html_a50cd3ac9b79ea04ea57f90bcac7c8fa9"><div class="ttname"><a href="classpcl_1_1_t_s_d_f_volume.html#a50cd3ac9b79ea04ea57f90bcac7c8fa9">pcl::TSDFVolume::voxelSize</a></div><div class="ttdeci">Eigen::Vector3f voxelSize() const</div><div class="ttdoc">Returns the size of one voxel in mm</div><div class="ttdef"><b>Definition:</b> tsdf_volume.h:196</div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>gpu/kinfu/tools/<a class="el" href="tools_2tsdf__volume_8h_source.html">tsdf_volume.h</a></li>
<li>gpu/kinfu/tools/<a class="el" href="tsdf__volume_8hpp_source.html">tsdf_volume.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_t_s_d_f_volume.html">TSDFVolume</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
